#include <stdio.h>

int main() {
    long long times; scanf("%lld", &times);
    double result = 3;
    for (long long i = 2; i <= times; i++) {
        double curr = 4.0 / (2 * i - 2) / (2 * i - 1) / (2 * i);
        result += (i & 1) ? -curr : curr;
    }
    printf("%.7lf", result);
    return 0;
}